import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);
import Login from '@/pages/Login.vue';
import Register from "../pages/Register";

import Home from "../pages/home/Home";
import HomeZyd from "../pages/home/HomeZyd";
import HomeJz from "../pages/home/HomeJz";
import HomePb from "../pages/home/HomePb";
import HomeQx from "../pages/home/HomeQx";


import Fit from "../pages/fit/Fit";
import Find from "../pages/find/Find";
import FitXl from "../pages/fit/FitXl";
import FitJl from "../pages/fit/FitJl";
import FitKc from "../pages/fit/FitKc";
import FitSc from "../pages/fit/FitSc";
import FindFxJx from "../pages/find/FindFxJx";

import My from "../pages/my/My";
import MySZ from "../pages/my/MySZ";
import MyZl from "../pages/my/MyZl";
import MyZy from "../pages/my/MyZy";
import ZhGl from "../pages/my/ZhGl";


export default new Router({
  routes: [
    {
      path:'/login',
      name:'login',
      component:Login
    },
    {
      path:'/register',
      name:'register',
      component:Register
    },
    {
      path:'/home',
      name:'home',
      component:Home,
      // redirect:'/home/zyd',
      children:[
        {
          path:'zyd',
          name:'zyd',
          component:HomeZyd
        },
        {
          path:'jz',
          name:'jz',
          component:HomeJz
        },
        {
          path:'pb',
          name:'pb',
          component:HomePb
        },
        {
          path:'qx',
          name:'qx',
          component:HomeQx
        }
      ]
    },
    {
      path:'/fit',
      name:'fit',
      component:Fit,
      children:[
        {
          path:'xl',
          name:'xl',
          component:FitXl
        },
        {
          path:'jl',
          name:'jl',
          component:FitJl
        },
        {
          path:'kc',
          name:'kc',
          component:FitKc
        },
        {
          path:'sc',
          name:'sc',
          component:FitSc
        }
      ]
    },
    {
      path:'/find',
      name:'find',
      component:Find,
      children:[
        {
          path:'fx',
          name:'fx',
          component:FindFxJx
        },
        {
          path:'jl',
          name:'jl',
          component:FitJl
        },
        {
          path:'kc',
          name:'kc',
          component:FitKc
        },
        {
          path:'sc',
          name:'sc',
          component:FitSc
        }
      ]
    },
    {
      path:'/my',
      name:'my',
      component:My,
      children:[
        {
          path:'sz',
          name:'sz',
          component:MySZ
        },
        {
          path:'zl',
          name:'zl',
          component:MyZl
        },
        {
          path:'zy',
          name:'zy',
          component:MyZy
        },
        {
          path:'zhgl',
          name:'zhgl',
          component:ZhGl
        }
      ]
    },
    {
      path:'/zl',
      name:'zl',
      component:MyZl
    },
    {
      path:'/sz',
      name:'sz',
      component:MySZ
    },
    {
      path:'/zhgl',
      name:'zhgl',
      component:ZhGl
    }
  ]
})
